}
});
+const Monitor = new Lang.Class({
+ Name: 'Monitor',
+
+ _init: function(index, geometry) {
+ this.index = index;
+ this.x = geometry.x;
+ this.y = geometry.y;
+ this.width = geometry.width;
+ this.height = geometry.height;
+ },
+
+ get inFullscreen() {
+ return global.screen.get_monitor_in_fullscreen(this.index);
+ }
+})
+
const defaultParams = {
trackFullscreen: false,
affectsStruts: false,
this.monitors = [];
let nMonitors = screen.get_n_monitors();
for (let i = 0; i < nMonitors; i++)
- this.monitors.push(screen.get_monitor_geometry(i));
+ this.monitors.push(new Monitor(i, screen.get_monitor_geometry(i)));
if (nMonitors == 1) {
this.primaryIndex = this.bottomIndex = 0;
},
_updateFullscreen: function() {
- for (let i = 0; i < this.monitors.length; i++)
- this.monitors[i].inFullscreen = global.screen.get_monitor_in_fullscreen (i);
-
this._updateVisibility();
this._queueUpdateRegions();
-
- this.emit('fullscreen-changed');
},
_windowsRestacked: function() {
this._desktopCloneState = State.HIDDEN;
this._notificationRemoved = false;
this._reNotifyAfterHideNotification = null;
- this._inFullscreen = false;
this._desktopClone = null;
this._inCtrlAltTab = false;
Main.layoutManager.trackChrome(this._notificationWidget);
Main.layoutManager.trackChrome(this._closeButton);
- Main.layoutManager.connect('fullscreen-changed', Lang.bind(this, this._updateState));
+ global.screen.connect('in-fullscreen-changed', Lang.bind(this, this._updateState));
Main.layoutManager.connect('hot-corners-changed', Lang.bind(this, this._hotCornersChanged));
// If the overview shows or hides while we're in